<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="姚德秋">
    <title></title>
    <style>
    .header{
        width: 800px;
        margin: 100px auto;
        background-color: black;
        border: 1px solid black;
    }
    .header>div{
        width: 120px;
        height: 40px;
        display: inline-block;
        color: white;
        position: relative;
        text-align: center;
        line-height: 40px;
    }
    .header>div section{
        width: 800px;
        position: absolute;
        background-color: white;
        border: 1px solid black;
        color: black;
    }
  .sec-last{
        left: -125px;
        display: none;
    }
    .sec-end{
        left: -250px;
        display: none;
    }   
    p{
        margin: 0 auto;
    }
    </style>
</head>
<body>
    <nav class="header">
        <div>选项一
            <section class="sec-frist">
               <p>内容一</p>
               <p>内容一</p>
               
            </section>
        </div>
        <div>
            选项二
            <section class="sec-last">
                <p>内容二</p>
                <p>内容二</p>
                <p>内容二</p>
                <p>内容二</p>
            </section>
        </div>
        <div>
            选项三
            <section class="sec-end">
                <p>内容三</p>
                <p>内容三</p>
                <p>内容三</p>                
            </section>
        </div>
    </nav>
<script src="./jquery.js"></script>
</body>
</html>
<script>
    $('div').each(function(index){
    $('div').hover(function (){
        $(this).css('background-color','blue').children().css('display','block')
        .end().siblings().css('background-color','black').children().css('display','none');
    })          
   }
 ) 
</script>